(function(app) {
    app
        .controller("content_40_inputCtrl", ["$scope", "myFactory", '$http', '$stateParams', '$state', "$q", '$timeout', '$location', '$ionicHistory', function($scope, myFactory, $http, $stateParams, $state, $q, $timeout, $location, $ionicHistory) {

            //参数定义、接收
            var itemId = $stateParams.changeTypeId; //变更项目ID
            var chdrnum01 = $stateParams.chdrnum01; //保单号
            var chdrcoy = $stateParams.chdrcoy; //保单公司号码
            var policyData; //保单详情
            var itemData; //用于接收初始化查询initContentItem的内容，里面存在各种各样的内容，比如item02_1
            var searchParam = $stateParams.searchParam;
            var initFlag = false; //检测标志，在初始化函数完成后，会被置为true
            var token = sessionStorage.getItem("token");

            //绑定参数到页面
            $scope.chdrnum01 = chdrnum01;
            $scope.readFlag = false; //阅读协议标志，默认为false
            $scope.readFlag2 = false; //阅读协议标志2，默认为false
            $scope.FlagFor40Input = false;
            $scope.beneClntNum = "";

            var accountNumDVAC = "";
            var bankCodeDVAC = "";
            var billFreqDVAC = "";
            /**********************************************初始化函数begin****************************************************/
            //初始化查询变更项内容
            $scope.load = function() {
                    myFactory.loadingShow(); //显示加载圈
                    var timestamp = myFactory.getTimetamp();
                    var sfis = "itemId-token-timestamp";
                    var signStr = "itemId=" + itemId + "&token=" + token + "&timestamp=" + timestamp; //encodeURI(name)
                    var sign = myFactory.hex(signStr);
                    //初始化查询变更项内容
                    $http({
                        method: 'GET',
                        url: app.domain + 'input/initContentItem.action',
                        params: { 'itemId': itemId, 'sign': sign, 'sfis': sfis, 'token': token, 'timestamp': timestamp }
                    }).then(function successCallback(response) {
                        if (response.data.success) {
                            itemData = response.data.data.modelMap;
                            $scope.item40 = itemData.item40;
                            $scope.banks = itemData.banks;
                            $scope.initCity = itemData.citylist;

                            var beneList = [];
                            if ($scope.item40 != null || $scope.item40 != undefined || $scope.item40 != "") {
                                beneList = $scope.item40.beneList;
                                if (beneList.length > 0) {
                                    accountNumDVAC = beneList[0].accountNum;
                                    bankCodeDVAC = beneList[0].recevieBank;
                                    billFreqDVAC = beneList[0].billFreq;
                                }
                            }
                            //填充页面隐藏元素
                            for (var i = 0; i < beneList.length; i++) {
                                if (beneList[i].benfType == 'S') {
                                    $scope.beneClntNum = beneList[i].clientNo;
                                }
                            }

                            //初始化生存金额领取方式，根据后台传上来的字段设置
                            var zdivOpt = itemData.zdivOpt;
                            $("#zdivOptSelect").val(zdivOpt);
                            $scope.zdivOptSelect = zdivOpt;
                            $("#zdivOptInput").val($("#zdivOptSelect option:selected").text());
                            if (zdivOpt == "DVAC") {
                                $scope.FlagFor40Input = false;
                            } else {
                                $scope.FlagFor40Input = true;
                            }


                            //初始化接受银行
                            //客户现在不想要一开始初始带出了，取消 BY ZZQ 2018-2-27
                            /*$("#recevieBankInputFor40Input").val($scope.banks[0].bankdesc);
                            $scope.recevieBankSelectFor40Input = $scope.banks[0].bankcode;
                            $("#recevieBankSelectFor40Input").val($scope.banks[0].bankcode);*/

                            //初始化默认城市
                            //客户现在不想要一开始初始带出了，取消 BY ZZQ 2018-2-27
                            /*$("#bankCityCodeFor40Input").val($scope.initCity[0].citycode.trim());//设置默认城市代码
                            $("#bankCityNameFor40Input").val($scope.initCity[0].citydesc.trim());//设置默认城市名称*/
                            initFlag = true; //标识初始化成功
                        }
                        myFactory.loadingHide();
                    }, function errorCallback(response) {
                        myFactory.loadingHide();
                        myFactory.alert("", "初始化查询变更项内容失败!", "info");
                    });
                }
                /**********************************************初始化函数end****************************************************/
                //重新受理
            $scope.renew = function() {
                    myFactory.renew();
                }
                //退出移动保全
            $scope.exit = function() {
                    myFactory.exit();
                }
                //返回上一页
            $scope.goBack = function() {
                    myFactory.goBack();
                }
                //客户须知弹框
            $scope.tipOpen = function() {
                modal('open', 'tip_model', 'overwindowOn40Input');
            }
            $scope.closeTip = function() {
                modal('close', 'tip_model', 'overwindowOn40Input');
            }
            $scope.tipOpen2 = function() {
                modal('open', 'tip_model2', 'overwindowOn40Input');
            }
            $scope.closeTip2 = function() {
                    modal('close', 'tip_model2', 'overwindowOn40Input');
                }
                //页面同意阅读协议复选框部分
            $scope.changeReadFlag = function(which) {
                    if (which == "1") {
                        $scope.readFlag = !$scope.readFlag;
                    } else if (which == "2") {
                        $scope.readFlag2 = !$scope.readFlag2;
                    }

                }
                //生存金领取方式选择下拉框
            $scope.onLiveChange = function() {
                    var options = $("#zdivOptSelect option:selected");
                    var value = options.val();
                    var text = options.text()
                    console.log(value);
                    console.log(text);
                    if (value == 'CSWD') { //现金领取时，显示其他需要填写的信息
                        $scope.FlagFor40Input = true;
                    } else if (value == 'DVAC') { //储存生息/留存公司时候，隐藏其他需要填写的信息
                        $scope.FlagFor40Input = false;
                    }
                    $("#zdivOptInput").val(text);
                }
                //银行选择弹框
            $scope.bankChose = function() {
                    var a = $("#recevieBankSelectFor40Input option:selected").val();
                    var b = $("#recevieBankSelectFor40Input option:selected").text();
                    console.log(a);
                    console.log(b);
                    $("#recevieBankInputFor40Input").val(b);
                }
                //S2019051508554《反洗钱监管-官微、移动保全增加核实投被保险关系功能需求》 add by csf 20190527 start
                //改变投保人和被保人关系的下拉框
            $scope.changePeoRelation = function() {
                    var options = $('#peopleRelationCause option:selected');
                    $('#peopleRelationInput').val(options.text());
                }
                //S2019051508554《反洗钱监管-官微、移动保全增加核实投被保险关系功能需求》 add by csf 20190527 end

            //城市弹框			
            $scope.cityChose = function() {
                modal('open', 'city_model', 'overwindowOn40Input');
            }
            $scope.cityClose = function() {
                    modal('close', 'city_model', 'overwindowOn40Input');
                }
                //查找城市方法
            $scope.searchCity = function() {
                    var cityName = $("#searchCityParam").val();
                    $scope.cityList = ""; //先做一次清空处理
                    myFactory.loadingShow(); //显示加载圈
                    $timeout(function() { myFactory.loadingHide(); }, 2000);
                    var timestamp = myFactory.getTimetamp();
                    var sfis = "cityName-token-timestamp";
                    var signStr = "cityName=" + encodeURI(cityName) + "&token=" + token + "&timestamp=" + timestamp; //encodeURI(name)
                    var sign = myFactory.hex(signStr);
                    $http({
                        method: 'GET',
                        url: app.domain + 'common/restSearchCity.action',
                        params: { 'cityName': cityName, 'sign': sign, 'sfis': sfis, 'token': token, 'timestamp': timestamp }
                    }).then(function successCallback(response) {
                        if (response.data.success) {
                            $scope.cityList = response.data.data;
                        }
                    }, function errorCallback(response) {
                        myFactory.alert("", "查询城市失败!", "info");
                    });
                }
                //城市选择
            $scope.cityClick = function(cityCode, cityName) {
                    $("#bankCityNameFor40Input").val(cityName.trim());
                    $("#bankCityCodeFor40Input").val(cityCode.trim());
                }
                //生存领取方式详情
            $scope.beneDetailModalFor40Input = function(index) {
                    $("#survival_receive_dialog1").fadeToggle(50);

                    //能点详情弹框触发这个函数说明已经有数据，不需要对数据进行判断，这里为具体读出数组第index个
                    $scope.beneDetailFor40Input = $scope.item40.beneList[index];

                    $("#survival_receive_dialog1 .myDialog_content .btn_close").click(function() {
                        $(this).parents('#survival_receive_dialog1').fadeOut(50);
                    });

                    $("#survival_receive_dialog1 .myDialog_black").click(function() {
                        $(this).parent('#survival_receive_dialog1').fadeOut(50);
                    });
                }
                //保单详情弹框
            $scope.showPolicyDetail = function() {
                    modal('open', 'policyModalOn40Input', 'overwindowOn40Input', 'policyCloseXOn40Input');
                    var timestamp = myFactory.getTimetamp();
                    var sfis = "chdrnum-chdrcoy-token-timestamp";
                    var signStr = "chdrnum=" + chdrnum01 + "&chdrcoy=" + chdrcoy + "&token=" + token + "&timestamp=" + timestamp; //encodeURI(name)
                    var sign = myFactory.hex(signStr);
                    //初始化时候查询保单详情
                    $http({
                        method: 'GET',
                        url: app.domain + 'query/restFindPolicyDetail.action',
                        params: { 'chdrnum': chdrnum01, 'chdrcoy': chdrcoy, 'sign': sign, 'sfis': sfis, 'token': token, 'timestamp': timestamp }
                    }).then(function successCallback(response) {
                        if (response.data.success) {
                            policyData = response.data.data;
                            $scope.policyData = policyData;
                            $scope.policyData.ptdate01 = myFactory.DateTools($scope.policyData.ptdate01);
                        }
                    }, function errorCallback(response) {
                        myFactory.alert("", "初始化查询订单详情失败!", "info");
                    });
                }
                //保单详情弹窗关闭函数
            $scope.policyCancelOn40Input = function() {
                    modal('close', 'policyModalOn40Input', 'overwindowOn40Input', 'policyCloseXOn40Input');
                }
                //关闭遮罩
            $scope.overwindowClose = function() {
                //$(".overwindow").show();
                $(".overwindow").hide();
                $(".overmodal").hide();
            }

            //只输入整数函授
            $scope.keyNumPress = function() {
                var keyCode = event.keyCode;
                if (keyCode >= 48 && keyCode <= 57) {
                    event.returnValue = true;
                } else {
                    event.returnValue = false;
                }
            }

            //下一步
            $scope.nextStep = function() {
                //判断是否初始化完成了，如果失败，不予进入下一步
                if (!initFlag) {
                    myFactory.alert("", "初始化时失败，请返回上一步重试", "info");
                    return false;
                }
                //S2019051508554《反洗钱监管-官微、移动保全增加核实投被保险关系功能需求》 add by csf 20190527 start
                var resonPeoRelationInput = $('#peopleRelationInput');
                if (resonPeoRelationInput.val() == '' || resonPeoRelationInput.val() == undefined) {
                    myFactory.alert("", "请选择投被保人关系", "info");
                    return;
                }
                var peopleRelationCause = $('#peopleRelationCause');
                if (peopleRelationCause.val() == '6') {
                    myFactory.alert("", "投保人与被保险人非直系亲属关系，需由被保险人的监护人提出一同申请，请通过书面办理。", "info");
                    return;
                }
                //S2019051508554《反洗钱监管-官微、移动保全增加核实投被保险关系功能需求》 add by csf 20190527 end
                var option = $("#zdivOptSelect option:selected");
                var _ZdivOpt = option.val(); //	生存金领取方式
                //	生存金领取方为<储存生息>时不做任何数据校验
                if ("DVAC" == _ZdivOpt) {
                    if ($scope.readFlag2 == false) {
                        myFactory.alert("", "请阅读《申请须知》！", "info");
                        return false;
                    }
                    /*直接封装数据跳转跳转下一页*/
                    //数据封装
                    var item = {
                            //						"accountNum":accountNum,
                            //						"bankCityName":$("#bankCityNameFor40Input").val().trim(),
                            //						"bankCityCode":$("#bankCityCodeFor40Input").val().trim(),//额外封装属性
                            //						"billChnlName":"银行转账",
                            //						"recevieBank":$("#recevieBankSelect option:selected").val().trim(),
                            "accountNum": accountNumDVAC,
                            "recevieBank": bankCodeDVAC,
                            "BillFreq": billFreqDVAC,
                            "itemId": itemId,
                            //S2019051508554《反洗钱监管-官微、移动保全增加核实投被保险关系功能需求》 add by csf 20190527 start
                            "zdivOpt": _ZdivOpt,
                            "peoRelation": peopleRelationCause.val()
                                //S2019051508554《反洗钱监管-官微、移动保全增加核实投被保险关系功能需求》 add by csf 20190527 end
                        }
                        //跳转checkMain
                    $ionicHistory.clearCache().then(function() {
                        $state.go('content_check_main', {
                            itemId: itemId,
                            item: item,
                            chdrnum01: chdrnum01,
                            chdrcoy: chdrcoy,
                            searchParam: searchParam
                        });
                    })
                } else {
                    if ($scope.readFlag == false) {
                        myFactory.alert("", "请阅读《生存保险金/年金转账付款授权客户须知》！", "info");
                        return false;
                    }

                    var bankName = $("#recevieBankInputFor40Input").val(); //开户银行名称
                    var bankCityCode = $('#bankCityCodeFor40Input').val(); //开户银行城市代码
                    var accountNum = $("#accountNumFor40Input").val(); //银行卡号

                    if (bankName == "") {
                        myFactory.alert("", "您尚未选择领取银行", "info");
                        return false;
                    }

                    if (accountNum == null || accountNum == undefined) {
                        accountNum = "";
                    } else {
                        accountNum = accountNum.replace(/\s+/g, "");
                    }
                    if (accountNum == "") {
                        myFactory.alert("", "您尚未输入领取账号", "info");
                        return false;
                    }
                    if (accountNum != "") {
                        var item;
                        var flag = false;
                        for (var i = 0; i < accountNum.length; i++) {
                            item = accountNum.charAt(i);
                            if (isNaN(item)) { //item为非数字
                                flag = true;
                            }
                        }
                        if (flag == true) {
                            myFactory.alert("", "领取账号请输入数字！", "info");
                            return false;
                        }
                    }

                    if (bankCityCode == "") {
                        myFactory.alert("", "您尚未选择开户城市", "info");
                        return false;
                    }

                    var ret = true;
                    var _beneClntNum = $("#beneClntNumFor40Input").val(); //	受益人客户号（生存金受益人的客户号）
                    var _bankcode = $("#recevieBankSelectFor40Input option:selected").val(); //	银行代码
                    var _bankacctkey = accountNum; //	银行账号
                    var _city = $('#bankCityCodeFor40Input').val(); //	银行开户城市代码
                    var _paynmeFlag = "3"; //	客户类型[1-投保人,2-被保人,3-受益人]
                    var _flag = "Y"; //	是否建账号[Y-是,N-否]

                    var timestamp = myFactory.getTimetamp();
                    var sfis = "bankcode-bankacctkey-paynmeFlag-flag-beneClntNum-token-timestamp";
                    var signStr = 'bankcode=' + _bankcode + '&bankacctkey=' + _bankacctkey + '&paynmeFlag=' + _paynmeFlag + '&flag=' + _flag + '&beneClntNum=' + _beneClntNum + "&token=" + token + "&timestamp=" + timestamp; //encodeURI(name)
                    var sign = myFactory.hex(signStr);
                    $http({
                        method: 'GET',
                        url: app.domain + 'charge/restCheck.action',
                        params: { 'bankcode': _bankcode, 'bankacctkey': _bankacctkey, 'city': _city, 'paynmeFlag': _paynmeFlag, 'flag': _flag, 'beneClntNum': _beneClntNum, 'sign': sign, 'sfis': sfis, 'token': token, 'timestamp': timestamp }
                    }).then(function successCallback(response) {
                        if (response.data.data.message == "fail") {
                            //myFactory.alert("","客户录入账号已被其它客户占用，请返回重新确认账号是否有误，如确认无误，请联系您的服务营销员或亲自来我司办理相关变更申请，办理时需提供你的存折卡复印件或开户证明文件，谢谢！","info");
                            myFactory.alert("", "客户录入账号已被其他客户占用，请重新确认账号是否有误，如确认无误，请通过书面形式办理本次申请，办理时需提供您的存折卡复印件或开户证明文件。", "info");
                            return false;
                        } else {
                            //校验通过，进入下一步

                            //数据封装
                            var item = {
                                    "accountNum": accountNum,
                                    "bankCityName": $("#bankCityNameFor40Input").val().trim(),
                                    "bankCityCode": $("#bankCityCodeFor40Input").val().trim(), //额外封装属性
                                    "billChnlName": "银行转账",
                                    "recevieBank": $("#recevieBankSelectFor40Input option:selected").val().trim(),
                                    "itemId": itemId,
                                    //S2019051508554《反洗钱监管-官微、移动保全增加核实投被保险关系功能需求》 add by csf 20190527 start
                                    "zdivOpt": _ZdivOpt,
                                    "peoRelation": peopleRelationCause.val()
                                        //S2019051508554《反洗钱监管-官微、移动保全增加核实投被保险关系功能需求》 add by csf 20190527 end
                                }
                                //跳转checkMain
                            $ionicHistory.clearCache().then(function() {
                                $state.go('content_check_main', {
                                    itemId: itemId,
                                    item: item,
                                    chdrnum01: chdrnum01,
                                    chdrcoy: chdrcoy,
                                    searchParam: searchParam
                                });
                            })
                        }
                    }, function errorCallback(response) {
                        myFactory.alert("", "校验信息时发生错误，请返回重试", "info");
                        return false;
                    });
                }
            }

            /**
             * 扫描银行卡信息
             */
            $scope.scanBankCardInfoItem40 = function() {
                    //移动端
                    cordova.sino.getBankCardInfo(function(result) {
                        if (result.success) {
                            if (!result.data.exit) {
                                if (appVersion === "IOS") {
                                    if (result.data.ok) {
                                        var cardNumber = result.data.CardNumber; //卡号
                                        var cardInsName = result.data.CardInsName; //领取银行
                                        var bankCardType = result.data.BankCardType; //银行卡类型
                                        //alert(CardNumber+","+CardInsName+","+BankCardType);
                                        cardNumber = cardNumber.replace(/ /g, "");
                                        $("#accountNumFor40Input").val(cardNumber);
                                        //自动填充开户银行
                                        var flag = false;
                                        for (var i = 0; i < $scope.banks.length; i++) {
                                            if ($scope.banks[i].bankdesc.indexOf(cardInsName) >= 0) {
                                                $scope.recevieBankSelectFor40Input = $scope.banks[i].bankcode;
                                                $("#recevieBankSelectFor40Input").val($scope.banks[i].bankcode);
                                                $("#recevieBankInputFor40Input").val($scope.banks[i].bankdesc);
                                                flag = true;
                                            }
                                        }
                                        if (!flag) {
                                            //没有扫描识别到银行名称，则通过配置名称进行匹配
                                            var bankName = myFactory.bankNameMatching(cardInsName);
                                            //S2019111110714银行卡识别错误 add by yangyan 20191126 start
                                            if ('' != bankName) {
                                                //S2019111110714银行卡识别错误 add by yangyan 20191126 end
                                                for (var i = 0; i < $scope.banks.length; i++) {
                                                    if ($scope.banks[i].bankdesc.indexOf(bankName) >= 0) {
                                                        $scope.recevieBankSelectFor40Input = $scope.banks[i].bankcode;
                                                        $("#recevieBankSelectFor40Input").val($scope.banks[i].bankcode);
                                                        $("#recevieBankInputFor40Input").val($scope.banks[i].bankdesc);
                                                        flag = true;
                                                    }
                                                }
                                                //S2019111110714银行卡识别错误 add by yangyan 20191126 start
                                            }
                                            //S2019111110714银行卡识别错误 add by yangyan 20191126 end
                                            if (!flag) {
                                                //S2019111110714银行卡识别错误 add by yangyan 20191126 start
                                                //myFactory.alert("","部分数据已自动填入，但查找不到开户银行，请手动选择开户银行与开户城市","info");
                                                myFactory.alert("", "部分数据已自动填入，但开户银行不在可选银行列表范围", "info");
                                                //S2019111110714银行卡识别错误 add by yangyan 20191126 end
                                            } else {
                                                myFactory.alert("", "部分数据已自动填入，请手动选择开户城市", "info");
                                            }
                                        } else {
                                            myFactory.alert("", "部分数据已自动填入，请手动选择开户城市", "info");
                                        }
                                    }
                                } else {
                                    cordova.sino.confirmBankCardInfo(function(result) {
                                        if (result.success) {
                                            if (result.data.ok) {
                                                var cardNumber = result.data.CardNumber; //卡号
                                                var cardInsName = result.data.CardInsName; //领取银行
                                                var bankCardType = result.data.BankCardType; //银行卡类型
                                                //alert(CardNumber+","+CardInsName+","+BankCardType);
                                                cardNumber = cardNumber.replace(/ /g, "");
                                                $("#accountNumFor40Input").val(cardNumber);
                                                //自动填充开户银行
                                                var flag = false;
                                                for (var i = 0; i < $scope.banks.length; i++) {
                                                    if ($scope.banks[i].bankdesc.indexOf(cardInsName) >= 0) {
                                                        $scope.recevieBankSelectFor40Input = $scope.banks[i].bankcode;
                                                        $("#recevieBankSelectFor40Input").val($scope.banks[i].bankcode);
                                                        $("#recevieBankInputFor40Input").val($scope.banks[i].bankdesc);
                                                        flag = true;
                                                    }
                                                }
                                                if (!flag) {
                                                    //没有扫描识别到银行名称，则通过配置名称进行匹配
                                                    var bankName = myFactory.bankNameMatching(cardInsName);
                                                    //S2019111110714银行卡识别错误 add by yangyan 20191126 start
                                                    if ('' != bankName) {
                                                        //S2019111110714银行卡识别错误 add by yangyan 20191126 end
                                                        for (var i = 0; i < $scope.banks.length; i++) {
                                                            if ($scope.banks[i].bankdesc.indexOf(bankName) >= 0) {
                                                                $scope.recevieBankSelectFor40Input = $scope.banks[i].bankcode;
                                                                $("#recevieBankSelectFor40Input").val($scope.banks[i].bankcode);
                                                                $("#recevieBankInputFor40Input").val($scope.banks[i].bankdesc);
                                                                flag = true;
                                                            }
                                                        }
                                                        //S2019111110714银行卡识别错误 add by yangyan 20191126 start
                                                    }
                                                    //S2019111110714银行卡识别错误 add by yangyan 20191126 end
                                                    if (!flag) {
                                                        //S2019111110714银行卡识别错误 add by yangyan 20191126 start
                                                        //myFactory.alert("","部分数据已自动填入，但查找不到开户银行，请手动选择开户银行与开户城市","info");
                                                        myFactory.alert("", "部分数据已自动填入，但开户银行不在可选银行列表范围", "info");
                                                        //S2019111110714银行卡识别错误 add by yangyan 20191126 end
                                                    } else {
                                                        myFactory.alert("", "部分数据已自动填入，请手动选择开户城市", "info");
                                                    }
                                                } else {
                                                    myFactory.alert("", "部分数据已自动填入，请手动选择开户城市", "info");
                                                }
                                            }
                                        } else {
                                            myFactory.alert('', '扫描银行卡信息失败:' + result.data.errormsg, 'info');
                                        }
                                    }, result.data)
                                }
                            }
                        } else {
                            //sino.alert("扫描银行卡信息失败:"+result.data.errormsg);
                            myFactory.alert('', '扫描银行卡信息失败:' + result.data.errormsg, 'info');
                        }
                    });

                    //PC端开发测试用
                    //				var result = {
                    //					data : {
                    //						CardNumber:"6216678911114523785",
                    //						CardInsName:"中国银行",
                    //						BankCardType:"借记卡",
                    //						ok:true
                    //					}
                    //				};
                    //				if(result.data.ok){
                    //
                    //					/*********************************待开发逻辑代码区域begin**********************************/
                    //					var cardNumber=result.data.CardNumber;//卡号
                    //					var cardInsName=result.data.CardInsName;//领取银行
                    //					var bankCardType=result.data.BankCardType;//银行卡类型
                    //					//alert(CardNumber+","+CardInsName+","+BankCardType);
                    //				    cardNumber = cardNumber.replace(/ /g,"");
                    //					$("#accountNumFor40Input").val(cardNumber);
                    //					//自动填充开户银行
                    //					var flag = false;
                    //					for(var i=0 ; i<$scope.banks.length ; i++){
                    //						if($scope.banks[i].bankdesc.indexOf(cardInsName)>=0){
                    //							$scope.recevieBankSelectFor40Input = $scope.banks[i].bankcode;
                    //							$("#recevieBankSelectFor40Input").val($scope.banks[i].bankcode);
                    //							$("#recevieBankInputFor40Input").val($scope.banks[i].bankdesc);
                    //							flag = true;
                    //						}
                    //					}
                    //					if(!flag){
                    //						myFactory.alert("","部分数据已自动填入，但查找不到开户银行，请手动选择开户银行与开户城市","info");
                    //					}else{
                    //						myFactory.alert("","部分数据已自动填入，请手动选择开户城市","info");
                    //					}
                    //					/*********************************待开发逻辑代码区域end**********************************/
                    //				}

                } //扫描银行卡信息函数END
        }]);
    //指针弹窗
    app.directive('infoid', function() {
        return {
            restrict: 'EA', //指明指令在DOM里面以什么形式被声明,EA.表示即可以是元素也可以是属性
            templateUrl: 'html/input/content_base_info.html' + app.clearCache,
            replace: true, //设置解析后，DOM声明的指令是否消失
            link: function(scope, element, attrs) { //链接函数负责注册DOM事件和更新DOM,
                console.log('指令完成');
            }
        }
    });
})(app)